package qita.inheritance.staticinheritance;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class Test {
	public static void main(String[] args) {
		try {
			Connection conn = DriverManager.getConnection("jdbc url");
			try {
				Statement statement = conn.createStatement();
				try {
					ResultSet resultSet = statement.executeQuery("sql query");
					try {
						// treat result set
					}
					finally {
						resultSet.close();
					}
				}
				finally {
					statement.close();
				}
			}
			finally {
				conn.close();
			}
		}
		catch (SQLException e) {
		}
		catch (Exception e) {
		}
	}
}